<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/3/16
  Time: 12:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ include file="../common/web_top.jsp" %>

<div class="bgSortScroll">
    <div class="public-bgContent">
        <div class="public-PoBefore-title" ng-click="sex()">查看借款申请</div>
        <!--导航 借款信息 借款人信息 资料清单-->
        <ul class="public-PoBefore-nav">
            <li class="record">
		 	<span>
			 	<a data-type="record" href="javascript:void(0)" class="activePublic">
			 		审批记录
			 	</a>
		 	</span>
            </li>
            <li>
                <span>
                    <a data-type="PersonMess" href="javascript:void(0)">
                        借款人信息
                    </a>
                </span>
            </li>
            <li>
                <span>
                    <a data-type="message" href="javascript:void(0)">
                        借款信息
                    </a>
                </span>
            </li>
            <li>
		 	<span>
			 	<a data-type="dataList" href="javascript:void(0)">
			 		资料清单
			 	</a>
		 	</span>
            </li>
        </ul>
        <!--中间可切换内容 public-content样式用作中间切换容器-->
        <%@ include file="../common/detail/orderDetail_apply_PersonMess.jsp" %>
        <%@ include file="../common/detail/orderDetail_apply_message.jsp" %>
        <%@ include file="../common/detail/orderDetail_image_upload.jsp" %>
        <%@ include file="../common/detail/record.jsp" %>
        <!-- public-content 结束 -->


        <!--底部提交评估按钮-->
        <div class="public-bgBotBtn" style="display: none">
            <button id="submit" ng-click="sel('2')" type="button">提交
            </button>
        </div>
    </div>
</div>

<%--第一步提交的流程节点表单，只有角色--%>
<div class="winBox special_processForm_winBox">
    <div class="winBox1">
        <div class="winBox3">
            <div class="dealrecord">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">角色审批</span>
                    <i class="iconfont icon-wrong headerIcon" id="show"></i>
                </div>

                <div class="resultBox">
                    <div class="centerBox" style="max-height: 512px;">
                        <div class="resultPadd formBox"
                             style="width: 600px; padding:0px 20px; overflow-y: auto; max-height: 500px;">
                        </div>
                    </div>
                </div>

                <!-- 内容角色下拉框 -->
                <div class="contentBox" style="padding-bottom: 50px; margin-top: 20px">

                    <div class="assBox">
                        <div class="assBox2"></div>
                        <div class="deleFooter">
                            <div class="beizhu assBeizhu"><span>*</span>审核备注</div>
                            <textarea style="width: 100%;height: 120px;border: 1px solid #E6E6E6;border-radius: 3px;" showtag="zishuxians"  class="approveRemark"></textarea>
                            <%--<div class="zishu">
                                <span id="zishuxians">200</span>字
                            </div>--%>
                        </div>
                        <div class="deleFooter" style="padding-bottom: 0;">
                            <div class="deleBtn">
                                <button id="specialRoamTask">
                                    确认提交
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<%--第一步之后的流程节点表单--%>
<div class="winBox processForm_winBox">
    <div class="winBox1">
        <div class="winBox3">
            <div class="dealrecord">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">角色审批</span>
                    <i class="iconfont icon-wrong headerIcon" id="show"></i>
                </div>


                <div class="resultBox">
                    <div class="centerBox" style="max-height: 600px; overflow-y: auto;">
                        <div class="resultPadd formBox"
                             style="padding: 0px 17px 0 20px;">
                            <table class="resultTab approve" style="margin-top: 20px">
                                <tbody class="role_list">
                                <tr class="esa">
                                    <td><span style="color: #FF0404;">*</span>审核结果：</td>
                                    <td>
                                        <label><input type="radio" name="faceResult" value="1"
                                                      ng-model="param.faceResult"
                                                      class="ng-pristine ng-untouched ng-valid ng-empty">审核通过</label>
                                        <label><input type="radio" name="faceResult" value="2"
                                                      ng-model="param.faceResult"
                                                      class="ng-pristine ng-untouched ng-valid ng-empty">拒绝审核</label>
                                    </td>
                                </tr>

                                <script type="text/x-handlebars-template" id="role_list_tpl">
                                    {{#if admins.[0]}}
                                    <tr class="role">
                                        <td><span style="color: #D5332C;">*</span>请选对象</td>
                                        <td class="tdSelect">
                                            <div class="se-re">
                                                <select id="role_select">
                                                    <option value="">请选择{{role_name}}</option>
                                                    {{#each admins}}
                                                    {{#if realName}}
                                                    <option value="{{id}}">{{realName}}</option>
                                                    {{/if}}
                                                    {{/each }}
                                                </select>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr class="chooseRole" style="display: none;">
                                        <td>已选择：</td>
                                        <td class="tdWei selPers">

                                        </td>
                                    </tr>
                                    {{else}}
                                    <tr class="role">
                                        <td><span style="color: #D5332C;">*</span>请选对象</td>
                                        <td class="tdSelect">
                                            <div class="se-re">
                                                <select id="role_select">
                                                    <option value="">无</option>
                                                    {{#each admins}}
                                                    {{#if realName}}
                                                    <option value="{{id}}">{{realName}}</option>
                                                    {{/if}}
                                                    {{/each }}
                                                </select>
                                                当前无审批人员，请联系管理员进行创建！
                                            </div>
                                        </td>
                                    </tr>
                                    {{/if}}
                                </script>
                                </tbody>
                            </table>
                            <div class="deleFooter">
                                <div class="beizhu assBeizhu"><span>*</span>审核备注</div>
                                <textarea class="approveRemark"></textarea>
                                <div class="deleBtn">
                                    <button style="background: #E55A5B;" id="roamTask">确定提交</button>
                                </div>
                                <%--<div class="zishu">
                                    <span id="zishuxians">200</span>字
                                </div>--%>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 内容角色下拉框 -->
            </div>
        </div>
    </div>
</div>


<script type="text/x-handlebars-template" id="form_list_tpl">
    {{#if attTypeInfos}}
    <table class="resultTab attachment" style="margin-top: 20px">
        <tbody>
        <!-- ngRepeat: (key,item) in AttaSele track by $index -->
        {{#each attTypeInfos}}
        <tr ng-repeat="(key,item) in AttaSele track by $index" class="">
            <td class="">{{type_name}}：</td>
            <td class="unload">
                <div class="_result">
                    <label><input type="radio" name="error_{{@index}}" {{#IF_EQ attachType 1}}checked{{/IF_EQ}} value="1" ng-value="1" ng-model="error_[key]"
                        class="ng-pristine ng-untouched ng-valid ng-not-empty">正常</label>
                    <label><input type="radio" name="error_{{@index}}" {{#IF_EQ attachType 2}}checked{{/IF_EQ}} value="2" ng-value="2" ng-model="error_[key]"
                        class="ng-pristine ng-untouched ng-valid ng-not-empty">异常</label>
                </div>
                <em id="imgTerm_0" class="viewPic" data-id="{{attchment_type_id}}"
                    data-attachname="{{type_name}}">上传图片</em>
                <div class="imgArr minImg">
                    <%--左箭头--%>
                    <span style="display: none" class="_pre " ng-if="item.isImg" ng-click="_pre(key)"></span>
                    <div class="cover" style="overflow-y: hidden;
    height: 70px;
    margin: 0 24px;">
                        <div id="gallery{{attchment_type_id}}" attachId="{{attchment_type_id}}"
                             attachname="{{type_name}}"
                             style="position: relative; left: 0;">
                            {{#each real_data}}
                            <li href="{{this}}"><img class="img_00" url="{{this}}" src="{{this}}/tupian_compress">
                                <i class="delSingleAttach iconfont icon-minus">
                                </i>
                            </li>
                            {{/each}}
                            <%--右箭头--%>
                        </div>
                    </div>
                    <span style="display: none" class="_next " ng-if="item.isImg" ng-click="_next(key)"></span>
                </div>
            </td>
        </tr><!-- end ngRepeat: (key,item) in AttaSele track by $index -->
        {{/each}}
        </tbody>
    </table>
    {{/if}}
    <%--自定义字段的渲染--%>
    {{#if productInfos}}
    <table class="productInfos resultTab" style="margin-top: 20px">
        <tbody>
        {{#each productInfos}}
        {{#if define_type}}
        <%--如果固定字段类型是form_name不显示--%>
        {{#IF_NEQ define_type 'form_name'}}
        <tr class="esa ">
            <td class="">
                {{#IF_EQ required '1'}}
                <span style="color:red">*</span>
                {{/IF_EQ}}
                {{name}}
            </td>

            <%--如果可编辑--%>
            {{#IF_EQ is_edit 1}}

            <%--文本框类型--%>
            {{#IF_EQ define_type 'text'}}
            <td class="tdWei tdRadio" name="{{name}}" require="{{required}}"
                property_id="{{define_id}}"
                style="background: #ffffff;">
                <label>
                    <input style="width: 148px" type="text" autocomplete="off" productForm="text"
                           class="ng-pristine ng-untouched ng-valid ng-empty"
                           value="{{real_data}}">
                </label>
            </td>
            {{/IF_EQ}}

            <%--下拉菜单控件类型--%>
            {{#IF_EQ define_type 'select'}}
            <td class="tdSelect" name="{{name}}" property_id="{{define_id}}"
                require="{{required}}"
                style="background: #ffffff;">
                <div class="se-re">
                    <select productForm="select"
                            class="ng-pristine ng-valid ng-not-empty ng-touched">
                        <option>请选择</option>
                        {{#each contentInfos}}
                        {{#each ../real_data}}
                        {{#IF_EQ ../id content_id}}
                        <option value="{{../../id}}" selected>{{../../content}}</option>
                        {{else}}
                        <option value="{{../../id}}">{{../../content}}</option>
                        {{/IF_EQ}}
                        {{/each}}
                        {{/each}}
                    </select>
                    <span class="se-po" style="right: 4px"></span>
                </div>
            </td>
            {{/IF_EQ}}

            <%--单选框类型--%>
            {{#IF_EQ define_type 'radio'}}
            <td style="background: #ffffff;" name="{{name}}" require="{{required}}"
                property_id="{{define_id}}">
                {{#if real_data}}
                {{#each contentInfos}}
                {{#each ../real_data}}
                {{#IF_EQ ../id content_id}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{../../../name}}"
                                                         value="{{../../id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty" checked>&nbsp;&nbsp;{{../../content}}</label>
                {{else}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{../../../name}}"
                                                         value="{{../../id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty">&nbsp;&nbsp;{{../../content}}</label>
                {{/IF_EQ}}
                {{/each}}
                {{/each}}
                {{else}}
                {{#each contentInfos}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{name}}"
                                                         value="{{id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty">&nbsp;&nbsp;{{content}}</label>
                {{/each}}
                {{/if}}
            </td>
            {{/IF_EQ}}

            <%--文本框类型--%>
            {{#IF_EQ define_type 'textarea'}}
            <td class="tdSelect" style="background: #ffffff;" name="{{name}}"
                property_id="{{define_id}}"
                require="{{required}}">
                <textarea productForm="textarea">{{real_data}}</textarea>
            </td>
            {{/IF_EQ}}
            {{#IF_EQ define_type 'checkbox'}}
            <td style="background: #ffffff;" name="{{name}}" property_id="{{define_id}}"
                require="{{required}}">
                {{#each contentInfos}}
                <label><input type="checkbox" productForm="checkbox" name="{{name}}"
                              value="{{id}}"
                              ng-model="param.faceResult"
                              class="ng-pristine ng-untouched ng-valid ng-empty"
                              {{#each ../real_data}}
                    {{#IF_EQ ../id content_id}}
                    checked
                    {{/IF_EQ}}
                    {{/each}}
                    >{{content}}</label>
                {{/each}}
            </td>
            {{/IF_EQ}}
            {{/IF_EQ}}

            <%--如果不可编辑则显示真实数据--%>
            {{#IF_EQ is_edit 2}}
            {{#if real_data}}
            <%--文本框类型--%>
            {{#IF_EQ define_type 'text'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">{{real_data}}</td>
            {{/IF_EQ}}

            <%--下拉菜单类型--%>
            {{#IF_EQ define_type 'select'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>

            {{/IF_EQ}}

            <%--单选框--%>
            {{#IF_EQ define_type 'radio'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>
            {{/IF_EQ}}

            <%--复选框--%>
            {{#IF_EQ define_type 'checkbox'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>
            {{/IF_EQ}}

            <%--文本框--%>
            {{#IF_EQ define_type 'textarea'}}
            <td>{{real_data}}</td>
            {{/IF_EQ}}
            {{else}}
            <td>未填写</td>
            {{/if}}
            {{/IF_EQ}}
        </tr>
        {{/IF_NEQ}}
        {{/if}}
        {{/each}}
        </tbody>
    </table>
    {{/if}}

    <%--固定字段的渲染--%>
    {{#if orderInfos}}
    <table class="resultTab fix" style="margin-top:20px ;">
        <tbody>
        {{#if feeInfos}}
        <tr>
            <td><span style="color:red">*</span>扣费明细</td>

            <td class="tdWei inst-detail">
                {{#each feeInfos}}
                {{#IF_EQ is_edit 1}}
                <span>
					 				<span>{{name}} :</span>
					 				<label class="slabel">
                                        <input fee_id="{{define_id}}" name="{{name}}" require="1"
                                                                 ng-focus="remHight()" type="text" autocomplete="off"
                                                                 ng-model="param.interest"
                                                                 class="ng-pristine ng-valid ng-not-empty ng-touched"
                                                                 value="{{real_data}}">
                                    {{#IF_EQ define_type '1'}}
					 					<span>元</span>
                                        {{else}}
                                        <span>分</span>
                                    {{/IF_EQ}}
                                    </label>
                                        </span>
                {{else}}
                <span>
                                                <span>{{name}}:</span>
                                                {{#if real_data}}
                                                   {{real_data}}
                                                     {{#IF_EQ define_type '1'}}
                                                      <span>元</span>
                                                       {{else}}
                                                      <span>分</span>
                                                     {{/IF_EQ}}
                                                {{else}}
                                                   <span>0</span>
                                                {{/if}}
                                                </span>


                {{/IF_EQ}}
                {{/each}}
            </td>
        </tr>
        {{/if}}
        {{#each orderInfos}}
        <tr>
            <td>{{#IF_NEQ fixed_key 'os_id'}}<span style="color:red">*</span>{{/IF_NEQ}}{{fixed_name}}
            </td>

            <%--{{#IF_EQ is_edit 1}}--%>
            <%--还款方式--%>
            {{#IF_EQ fixed_key 'repayment_way'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="repanymentWay_content" require="1" name='还款方式'
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">
                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            <%--申请金额--%>
            {{#IF_EQ fixed_key 'apply_money'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">
                <label><input type="text" autocomplete="off" require="1" id="apply_money" name="申请金额"
                              column_key="{{fixed_key}}"
                              class="ng-pristine ng-untouched ng-valid ng-empty"/>元
                </label>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'os_id'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="orderSource_content" require="0" name="订单来源"
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">

                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'at_id'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="applyTerm_content" name="申请期限" require="1"
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">

                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'lt_id'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="loanType_content" require="1" name="贷款类型"
                            column_key="{{fixed_key}}">
                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'loan_way'}}
            <td>
                <div class="controls" id="loanMethod_content" require="1" name="贷款方式"
                     column_key="{{fixed_key}}">
                </div>
            </td>
            {{/IF_EQ}}

            <%--申请金额--%>
            {{#IF_EQ fixed_key 'interest'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">
                <label><input type="text" autocomplete="off" require="1" id="interest" name="利率"
                              column_key="{{fixed_key}}" value="{{real_data}}"
                              class="ng-pristine ng-untouched ng-valid ng-empty"/>分
                </label>
            </td>
            {{/IF_EQ}}
            <%--{{/IF_EQ}}--%>
            <%--{{#IF_EQ is_edit 2}}
            <td>{{real_data}}</td>
            {{/IF_EQ}}--%>
        </tr>
        {{/each}}
        </tbody>
    </table>
    {{/if}}
</script>

<script type="text/x-handlebars-template" id="special_role_list_tpl">
    {{#if admins.[0]}}
    <div style="color: #666; font-weight: 600;">
        <span>{{role_name}}</span>
    </div>
    <div class="se-re public-bgDate">
        <select id="role_select">
            <option value="" selected>请选择</option>
            {{#each admins}}
            {{#if realName}}
            <option value="{{id}}">{{realName}}</option>
            {{/if}}
            {{/each }}
        </select>
    </div>
    {{else}}
    <div style="color: #666; font-weight: 600;">
        <span>无</span>
    </div>
    <div class="se-re public-bgDate">
        <select id="role_select">
            <option value="" selected>请选择</option>
        </select>
    </div>
    <div>当前无审批人员，请联系管理员进行创建！</div>
    {{/if}}
</script>

<script type="text/x-handlebars-template" id="at_id_tpl">
    <option value="">分期</option>
    {{#each .}}
        <option value="{{id}}" data-num="{{num}}">{{atName}}</option>
    {{/each}}
</script>

<link href="static/plugins/FormbuildV1.0/Public/css/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<link type="text/css" rel="stylesheet" href="static/css/formbuild.css?_v=190102162154">
<link href="static/css/viewer.css" rel="stylesheet"/>
<script type="text/javascript" src="static/plugins/ueditor/ueditor.config.js?_v=190102162154"></script>
<script type="text/javascript" src="static/plugins/ueditor/ueditor.all.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/jquery-plugin/Intelligent_association.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/jquery-plugin/viewer-fake.js?_v=190102162155"></script>
<script type="text/javascript" src="static/js/bootstrap/bootstrap.min.js?_v=190102162154"></script>
<%--<script type="text/javascript" src="static/js/page/index/index.js"></script>--%>
<script type="text/javascript">
    requireJS(['constant', 'site', 'handlebars','detail'], function (Constant, site, Handlebars, Detail) {
        Detail();
    })
</script>

<%@ include file="../common/web_bottom.jsp" %>
